package com.dingding.service.user.core.dao.impl;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.dingding.common.core.base.dao.impl.BaseDaoImpl;
import com.dingding.common.core.beans.OrderComment;
import com.dingding.service.user.core.dao.IOrderCommentDao;

/**
 * @ClassName: OrderCommentDaoImpl 
 * @Description: 订单评论DAO实现类
 * @author YHQ
 * @date 2016年5月12日 上午11:19:59
 */
@Component("orderCommentDao")
public class OrderCommentDaoImpl extends BaseDaoImpl<OrderComment> implements IOrderCommentDao {

	private Logger log = Logger.getLogger(this.getClass());
	
	/**
	 * @Title: addOrderCommentInfo 
	 * @Description: 添加订单评论信息
	 * @param orderComment 乘客的评论信息
	 * @author YHQ 
	 * @return boolean    true:成功  false:失败
	 */
	@Override
	@Transactional(propagation=Propagation.REQUIRED)
	public boolean addOrderCommentInfo(OrderComment orderComment) {
		
		try {
			
			super.save(orderComment);
			
			return true;
		} catch (Exception e) {
			log.error("添加订单评论时出现异常  类："+this.getClass()+" addOrderCommentInfo()", e);
		}
		
		return false;
	}

}
